package org.langqiao.experiment.experiment4;

public class Circle extends Graphics{
		private double a;
		
		public Circle(String shape, double a) {
			super(shape);
			this.a = a;
			
		}
		
		public double area() {
			double p=Math.PI*a*a;
			return Math.PI*a*a;
		}

		public double perimeter() {
			return 2*Math.PI*a;
		}
		
		public static void main(String []args){
			new Circle("圆形",4.0).print();
		}

		
	
}
